//
//  OneSelectCell.m
//  susnsuns
//
//  Created by KWSD on 15/12/9.
//  Copyright © 2015年 KWSD. All rights reserved.
//

#import "OneSelectCell.h"
#import "Masonry.h"
#import "UIColor+CL.h"
@implementation OneSelectCell

- (void)awakeFromNib {
    // Initialization code
}

-(instancetype)initIdentifier:(NSString *)identifer{
  self=  [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifer];
    if(self){
        UIView *superView = [self createUI];
        [self.contentView addSubview:superView];
        UIView *superview = self.contentView;
        UIEdgeInsets edge = UIEdgeInsetsMake(0, 0, 0, 0);
        [superView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(superview).insets(edge);
        }];

    }
    return self;
}

-(UIView *)createUI{
    UIView *baseView = [[UIView alloc]init];
    _la =[[UILabel alloc]init];
    [baseView addSubview:_la];
    _la.text = @"gogog";
    [_la sizeToFit];
    [_la mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(baseView.mas_left).offset(20);
        make.centerY.equalTo(baseView.mas_centerY);
    }];
    _la.textColor = [UIColor colorWithHex:0x6f6f6f];
    
    _btn =[UIButton buttonWithType:UIButtonTypeCustom];
    [baseView addSubview:_btn];
    [_btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(baseView.mas_right).offset(-20);
        make.centerY.equalTo(baseView.mas_centerY);
        make.height.equalTo(@(30));
        make.width.equalTo(@(30));
    }];
    
    _btn.enabled = NO;
    [_btn setImage:[UIImage imageNamed:@"椭圆-1-拷贝-3"] forState:UIControlStateNormal];
//    [_btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
    return baseView;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
